<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="js/vue.min.js"></script>
<style type="text/css">
.red{color:red;}
.orange{color:orange;}
.yellow{color:yellow;}
</style>
</head>
<body>
<div id="myApp">
<h3>v-style绑定样式</h3>
<div v-bind:style="{color:activeColor,fontSize:fontSize+'px'}">{{message}}</div>
<div v-bind:style="styles">{{message}}</div>
</div>
<script type="text/javascript">
var myApp = new Vue({
	el:"#myApp",
	data:{ 
		message:'hello world!',
		activeColor:'red',
		fontSize:16,
		styles:{
			color: 'red',
      		fontSize: '24px'
		}
	}
});
</script>
</body>
</html>